package com.igroupes.ovineherd.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.igroupes.ovineherd.enums.BooleanKey;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 数据模型实体
 * @author iuv
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@TableName(value = "data_model_table",autoResultMap = true)
public class DataModelTableEntity extends BaseEntity{

    public static final Integer ADD = 2;
    public static final Integer EDIT = 3;
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 表名
     */
    private String name;
    /**
     * 表说明
     */
    private String desc;
    /**
     * 对应数据库名称
     */
    private String dbName;

    /**
     * 真删除
     */
    private Integer softDel= BooleanKey.TRUE.getCode();

    /**
     * 添加时间
     */
    private Integer addDatetime= BooleanKey.TRUE.getCode();
    /**
     * 添加人
     */
    private Integer addOperator= BooleanKey.TRUE.getCode();
    /**
     * 修改时间
     */
    private Integer editDatetime= BooleanKey.TRUE.getCode();

    /**
     * 修改人
     */
    private Integer editOperator = BooleanKey.TRUE.getCode();
    /**
     * 所属应用
     */
    private Integer applicationId;
    private String beanType;

    private Integer datasourceId;
    private Integer datasourceType = 1;

    private Integer order = 1;
    private Integer status; // 1:原始， 2:新增 4:原始的字段编辑 5:新增的字段编辑
    private Long versionId;
    private Long sourceId;
//    private Long appId;
}
